public class Test222 {

    public static void main(String[] args) {


        Cat cat = new Cat("咪咪",2,"三花");
        Dog dog = new Dog("大黄",3,"yellow");


    }

}

class Animal{

    String name;
    int age;

    public Animal(String name, int age){

        this.name = name;
        this.age = age;
        this.eat();

    }
    public void eat(){

        System.out.println("正在吃饭");

    }
    public void show(){

        //

    }

}

class Dog extends Animal{

    String color;

    public Dog(String name, int age, String color){

            super(name, age);
            this.color = color;

    }
    public void eat(){

        System.out.println(this.name+"正在吃狗粮");

    }
    public void bark(Dog dog){

        System.out.println(this.name+"在汪汪叫");

    }

}
class Cat extends Animal{

    String color;
    public Cat(String name, int age, String color){

        super(name, age);
        this.color = color;
        //eat();

    }
    public void eat(){

        System.out.println(this.name+"正在吃猫粮");

    }

}


